package com.suxin.spring.configuration;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.env.PropertySources;

/**
 * @author Tang
 * @classname PropertySourcesDeducer
 * @description [  ]
 * @date 2023/3/21 15:45
 */
public class PropertySourcesDeducer {

    private final ApplicationContext applicationContext;

    public PropertySourcesDeducer(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public PropertySources getPropertySources() {
        return this.applicationContext.getBean(PropertySourcesPlaceholderConfigurer.class).getAppliedPropertySources();
    }
}
